package cn.sykj.car.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户钱包（添加用户信息时，自动生成一条钱包记录，注意，如果卡类型已有，在原纪录基础上修改钱包）
 * </p>
 *
 * @author duanzis
 * @since 2021-06-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="CarUserWallet对象", description="用户钱包（添加用户信息时，自动生成一条钱包记录，注意，如果卡类型已有，在原纪录基础上修改钱包）")
public class CarUserWallet extends Model<CarUserWallet> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "卡类型：config_card_category.id")
    private Integer cardCategory;

    @ApiModelProperty(value = "总余额：包含储值金额+返现+赠送")
    private Integer totalWallet;

    @ApiModelProperty(value = "退总金额")
    private Integer refundTotalWallet;

    @ApiModelProperty(value = "积分（只能花，不能返现）")
    private Integer integral;

    @ApiModelProperty(value = "退积分")
    private Integer refundIntegral;

    @ApiModelProperty(value = "返现金（只能花，不能返现）")
    private Integer sendCash;

    @ApiModelProperty(value = "退返现")
    private Integer refundCash;

    @ApiModelProperty(value = "赠送金额（只能花，不能提现）")
    private Integer sendAmount;

    @ApiModelProperty(value = "退赠送")
    private Integer refundAmount;

    @ApiModelProperty(value = "发行起始时间")
    private Date startTime;

    @ApiModelProperty(value = "发行终止时间")
    private Date endTime;

    @ApiModelProperty(value = "用户id；car_user.id")
    private Integer userId;

    @ApiModelProperty(value = "实际充值余额")
    private Integer wallet;

    @ApiModelProperty(value = "退充值余额")
    private Integer refundWallet;

    @ApiModelProperty(value = "删除标记：0-正常 1-删除")
    @TableLogic
    private Integer delFlag;

    private Date createTime;

    private Date updateTime;

    private String createUser;

    private String updateUser;

    @ApiModelProperty(value = "钱包状态（会员卡状态）：1-在用  0-停用（退款）")
    private Integer status;


    public static final String ID = "id";

    public static final String CARD_CATEGORY = "card_category";

    public static final String TOTAL_WALLET = "total_wallet";

    public static final String REFUND_TOTAL_WALLET = "refund_total_wallet";

    public static final String INTEGRAL = "integral";

    public static final String REFUND_INTEGRAL = "refund_integral";

    public static final String SEND_CASH = "send_cash";

    public static final String REFUND_CASH = "refund_cash";

    public static final String SEND_AMOUNT = "send_amount";

    public static final String REFUND_AMOUNT = "refund_amount";

    public static final String START_TIME = "start_time";

    public static final String END_TIME = "end_time";

    public static final String DEL_FLAG = "del_flag";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String CREATE_USER = "create_user";

    public static final String UPDATE_USER = "update_user";

    public static final String STATUS = "status";

    public static final String USER_ID = "user_id";

    public static final String WALLET = "wallet";

    public static final String REFUND_WALLET = "refund_wallet";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
